package cn.tedu.boot06_1.controller;

import cn.tedu.boot06_1.entity.Product_1;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    public String helloAxios() {
        return "测试成功!";
    }
    @RequestMapping("p1")
    public String p1(String name, int age) {
        return name + ":" + age;
    }
    @RequestMapping("/p2")
    public String p2(@RequestBody Product_1 product_1) {
        return product_1.toString();
    }

}
